//
//  HotHeadView.m
//  谈诗说词
//
//  Created by dllo on 15/6/16.
//  Copyright (c) 2015年 lanou3g.com蓝鸥科技. All rights reserved.
//

#import "HotHeadView.h"
#define WIDTH [UIScreen mainScreen].bounds.size.width
#define HEIGHT [UIScreen mainScreen].bounds.size.height
@implementation HotHeadView

- (void)dealloc
{
    
}
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createView];
    }
    return self;
}
- (void)createView
{
    UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, WIDTH, self.frame.size.height)];
    [imageView setImage:[UIImage imageNamed:@"HeadView.png"]];
    [self addSubview:imageView];
    
    self.titlabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0.1 * WIDTH, WIDTH, 0.25 * WIDTH)];
    self.titlabel.font = [UIFont fontWithName:@"-" size:25];
    self.titlabel.numberOfLines = 0;
    self.titlabel.textColor = [UIColor blackColor];
    self.titlabel.textAlignment = 1;
    [imageView addSubview:self.titlabel];
    
    
    self.authorLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0.28 * WIDTH, WIDTH, 0.08 * WIDTH)];
    self.authorLabel.font = [UIFont fontWithName:@"-" size:17];
    self.authorLabel.textColor = [UIColor blackColor];
    self.authorLabel.textAlignment = 1;
    [self addSubview:self.authorLabel];
    
    
    
    self.contentLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0.35 * WIDTH, WIDTH, 0.13 * WIDTH)];
    self.contentLabel.font = [UIFont fontWithName:@"X-" size:20];
    self.contentLabel.textColor = [UIColor blackColor];
    self.contentLabel.textAlignment = 1;
    [imageView addSubview:self.contentLabel];
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
    [(NSObject *)self.target performSelector:self.action withObject:self];
}

@end
